package cn.cau.epidemicsurveysystem.bean;

import javax.persistence.*;
import java.util.Objects;

@Entity
@Table(name = "staffInfo", schema = "gp2022", catalog = "")
@IdClass(StaffInfoEntityPK.class)
public class StaffInfoBean {
    private int staffId;
    private String staffNo;
    private String staffName;
    private String staffPwd;
    private String staffTele;
    private String staffWorkplace;
    private String staffPosition;
    private Integer staffWorkState;
    private String staffWorkArea;

    @Id
    @Column(name = "staffId")
    public int getStaffId() {
        return staffId;
    }

    public void setStaffId(int staffId) {
        this.staffId = staffId;
    }

    @Id
    @Column(name = "staffNo")
    public String getStaffNo() {
        return staffNo;
    }

    public void setStaffNo(String staffNo) {
        this.staffNo = staffNo;
    }

    @Basic
    @Column(name = "staffName")
    public String getStaffName() {
        return staffName;
    }

    public void setStaffName(String staffName) {
        this.staffName = staffName;
    }

    @Basic
    @Column(name = "staffPwd")
    public String getStaffPwd() {
        return staffPwd;
    }

    public void setStaffPwd(String staffPwd) {
        this.staffPwd = staffPwd;
    }

    @Basic
    @Column(name = "staffTele")
    public String getStaffTele() {
        return staffTele;
    }

    public void setStaffTele(String staffTele) {
        this.staffTele = staffTele;
    }

    @Basic
    @Column(name = "staffWorkplace")
    public String getStaffWorkplace() {
        return staffWorkplace;
    }

    public void setStaffWorkplace(String staffWorkplace) {
        this.staffWorkplace = staffWorkplace;
    }

    @Basic
    @Column(name = "staffPosition")
    public String getStaffPosition() {
        return staffPosition;
    }

    public void setStaffPosition(String staffPosition) {
        this.staffPosition = staffPosition;
    }

    @Basic
    @Column(name = "staffWorkState")
    public Integer getStaffWorkState() {
        return staffWorkState;
    }

    public void setStaffWorkState(Integer staffWorkState) {
        this.staffWorkState = staffWorkState;
    }

    @Basic
    @Column(name = "staffWorkArea")
    public String getStaffWorkArea() {
        return staffWorkArea;
    }

    public void setStaffWorkArea(String staffWorkArea) {
        this.staffWorkArea = staffWorkArea;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        StaffInfoBean that = (StaffInfoBean) o;
        return staffId == that.staffId && Objects.equals(staffNo, that.staffNo) && Objects.equals(staffName, that.staffName) && Objects.equals(staffPwd, that.staffPwd) && Objects.equals(staffTele, that.staffTele) && Objects.equals(staffWorkplace, that.staffWorkplace) && Objects.equals(staffPosition, that.staffPosition) && Objects.equals(staffWorkState, that.staffWorkState) && Objects.equals(staffWorkArea, that.staffWorkArea);
    }

    @Override
    public int hashCode() {
        return Objects.hash(staffId, staffNo, staffName, staffPwd, staffTele, staffWorkplace, staffPosition, staffWorkState, staffWorkArea);
    }
}
